package com.cd.socialMarketing.service.generic;

/** @author Agustin Cingolani
 *  02/05/2013
 */

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.Criterion;

import com.cd.socialMarketing.model.AbstractEntity;

public interface IGenericManager<K extends Serializable, E extends AbstractEntity> {
   
    public E get(K id);
    public List<E> list();
    public List<E> list(String order, String type);
    public List<E> list(Integer from, Integer count);
    public List<E> list(Integer from, Integer count, String order, String type);
    public Map<String, Object> filtro(Object... keyValue);
    public List<E> find(Map<String, Object> filtro);
    public List<E> find(Map<String, Object> filtro, Integer from, Integer count);
    public List<E> find(Map<String, Object> filtro, Integer from, Integer count, String order, String type);
    public List<E> find(Criterion criterion, Integer from, Integer count);
    public List<E> find(Criterion criterion, Integer from, Integer count, String order, String type);
    public E findUnique(Map<String, Object> filtro);
    public List<E> findByName(String nombre);
    public Long count(Map<String, Object> filtro);
    public Long count(Criterion criterion);
    public void delete(E entity);
    public void save(E entity);
    
}
